package cs301.msflags;

import cs301.game.GameAction;

/**
 * @author John Olennikov
 * @author Kyanne Mayfield
 * @author Allie Seibert
 * @author Emilia Holbik
 * @version 12/7/2012
 * 
 *          This action indicates that a player has set his or her preferred
 *          dimensions of the Board on which to play. 
 */

public class MSFlagsConfigureBoardAction extends GameAction {

	/**
	 * User set width of the Board
	 */
	
	private int width = 0;
	
	/**
	 * User set height of the Board
	 */
	
	private int height = 0;
	
	/**
	 * User set number of mines on the Board
	 */
	
	private int numMines = 0;

	/**
	 * Calls the constructor in GameAction class and updates who performed this
	 * action.
	 * 
	 * @param initWidth: initializes board width
	 * @param initHeight: initializes board width
	 * @param initNumMines: initializes number of mines of board
	 * @param source: initializes source of action
	 */
	public MSFlagsConfigureBoardAction(int source, int initWidth,
			int initHeight, int initNumMines) {
		super(source);

		this.width = initWidth;
		this.height = initHeight;
		this.numMines = initNumMines;
	}
	
	/**
	 * @return int: width of the Board
	 */
	public int getWidth()
	{
		return this.width;
	}
	
	/** 
	 * @return height: height of the Board
	 */
	public int getHeight()
	{
		return this.height;
	}
	
	/**
	 * @return int: number of mines on the Board
	 */
	public int getNumMines()
	{
		return this.numMines;
	}
}
